//package com.hzncc.scaffold.controller.other;
//
//
//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.web.bind.annotation.*;
//
//import javax.annotation.Resource;
//import java.util.List;
//
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
//import com.hzncc.scaffold.core.ResultT;
//import com.hzncc.scaffold.service.JobService;
//import com.hzncc.scaffold.entity.Other.Job;
//import org.springframework.web.bind.annotation.RestController;
//
///**
// * <p>
// * 职位表 前端控制器
// * </p>
// *
// * @author DrunkBear
// * @since 2022-04-27
// */
//@RestController
//@RequestMapping("/job")
//@Api(tags = "职位表接口")
//public class JobController {
//
//    @Resource
//    private JobService jobService;
//
//    /**
//     * 查询表中所有信息
//     *
//     * @return
//     */
//    @GetMapping
//    @ApiOperation("查询所有职位表中数据")
//    public ResultT findAll() {
//        return ResultT.success(jobService.list());
//    }
//
//    /**
//     * 根据Id查询表中数据
//     *
//     * @param id
//     * @return
//     */
//    @GetMapping("/{id}")
//    @ApiOperation("根据Id查询职位表中数据")
//    public ResultT findOne(@PathVariable Integer id) {
//        return ResultT.success(jobService.getById(id));
//    }
//
//    /**
//     * 分页查询
//     *
//     * @param pageNum
//     * @param pageSize
//     * @return
//     */
//    @GetMapping("/page")
//    @ApiOperation("分页查询职位表中数据")
//    public ResultT findPage(@RequestParam Integer pageNum, @RequestParam Integer pageSize) {
//        QueryWrapper<Job> queryWrapper = new QueryWrapper<>();
//        return ResultT.success(jobService.page(new Page<>(pageNum, pageSize), queryWrapper));
//    }
//
//    /**
//     * 新增和更新接口
//     *
//     * @param
//     * @return
//     */
//    @PostMapping
//    @ApiOperation("新增或更新职位表中数据")
//    public ResultT save(@RequestBody Job job) {
//        jobService.saveOrUpdate(job);
//        return ResultT.success();
//    }
//
//    /**
//     * 根据Id删除表中数据
//     *
//     * @param id
//     * @return
//     */
//    @DeleteMapping("/{id}")
//    @ApiOperation("根据Id删除职位表中数据")
//    public ResultT delete(@PathVariable Integer id) {
//        jobService.removeById(id);
//        return ResultT.success();
//    }
//
//    /**
//     * 批量删除表中数据
//     *
//     * @param ids
//     * @return
//     */
//    @PostMapping("/del/batch")
//    @ApiOperation("批量删除职位表中数据")
//    public ResultT deleteBatch(@RequestBody List<Integer> ids) {
//        jobService.removeByIds(ids);
//        return ResultT.success();
//    }
//
//    @PostMapping("/queryByEntity")
//    @ApiOperation("条件查询")
//    public ResultT queryByEntity(Job job) {
//        LambdaQueryWrapper<Job> lqw = new LambdaQueryWrapper<>();
//        lqw.eq(job.getId() != null, Job::getId, job.getId());
//        lqw.eq(job.getTitle() != null, Job::getTitle, job.getTitle());
//        lqw.eq(job.getType() != null, Job::getType, job.getType());
//        lqw.eq(job.getEducation() != null, Job::getEducation, job.getEducation());
//        lqw.eq(job.getSalary() != null, Job::getSalary, job.getSalary());
//        lqw.eq(job.getAddress() != null, Job::getAddress, job.getAddress());
//        lqw.eq(job.getNeedNum() != null, Job::getNeedNum, job.getNeedNum());
//        lqw.eq(job.getCreateBy() != null, Job::getCreateBy, job.getCreateBy());
//        lqw.eq(job.getStatus() != null, Job::getStatus, job.getStatus());
//        lqw.eq(job.getPublisherId() != null, Job::getPublisherId, job.getPublisherId());
//        lqw.eq(job.getPubTime() != null, Job::getPublisherId, job.getPublisherId());
//        lqw.eq(job.getCreateTime() != null, Job::getCreateTime, job.getCreateTime());
//        lqw.eq(job.getContent() != null, Job::getContent, job.getContent());
//        lqw.eq(job.getBelongsTo() != null, Job::getBelongsTo, job.getBelongsTo());
//        lqw.eq(job.getStayAtTop() != null, Job::getStayAtTop, job.getStayAtTop());
//        lqw.eq(job.getSortTime() != null, Job::getSortTime, job.getSortTime());
//        lqw.eq(job.getProvince() != null, Job::getProvince, job.getProvince());
//        lqw.eq(job.getCity() != null, Job::getCity, job.getCity());
//        lqw.eq(job.getDistrict() != null, Job::getDistrict, job.getDistrict());
//
//        List<Job> jobList = jobService.list(lqw);
//        return ResultT.success(jobList);
//    }
//
//}
